API Help
Eplan.EplApi.DataModel.E3D Namespace / Cabinet Class / Create Method / Create(Project,String,String,Int32,List<Placement3D>) Method
Project to which this object will be assign. Can't be null.
Part number of article used to create this object. Can't be null or have zero length.
Part variant of article. If null or empty first variant is used.
Variant of macro which will be used for creating the object.
Additionally created objects are stored in this list. If not null will be cleared.
Example

Create(Project,String,String,Int32,List<Placement3D>) Method
Creates not placed Cabinet based on article which contain macro.
Syntax

Parameters

oProject
Project to which this object will be assign. Can't be null.
strPartNr
Part number of article used to create this object. Can't be null or have zero length.
strVariant
Part variant of article. If null or empty first variant is used.
nMacroVariant
Variant of macro which will be used for creating the object.
listOfAdditionalPlacements
Additionally created objects are stored in this list. If not null will be cleared.
Exceptions
ExceptionDescription
Thrown when required param is null value. Check exception message for more info.
Thrown when one of params is invalid. Check exception message for more info.
Thrown when object can't be created. Check exception message for more info.
Thrown when macro file is missing or is invalid. Check exception message for more info.
Thrown when macro doesn't contain requested variant. Check exception message for more info.
Remarks
This method can create cabinet only from part which has an assign macro. If no macro is available then exception is thrown.
Example
//Data for creating the cabinet
List<Placement3D> listAdditionalPlacements = new List<Placement3D>();
String strPartNr = "Cabinet_With_Variants";
String strPartVariantNr = "1";          //First part variant
int nMacroVariant = 1;                  //Variant B

//Creating cabinet
Cabinet oCabinet = new Cabinet();
oCabinet.Create(m_oTestProject, strPartNr, strPartVariantNr, nMacroVariant, listAdditionalPlacements);

//Placing cabinet
oCabinet.SetParent(oInstallationSpace, true);


See Also